# What is the smallest value of n such that an 
# algorithm whose running time is 100n^2 runs
# faster than an algorithm whose running time 
# is 2^n on the same machine?

_START_VALUE = 1
_MAX_VALUE = 100000

def main():
  for n in xrange(_START_VALUE, _MAX_VALUE):
    first_alg = 100 * pow(n, 2)
    second_alg = pow(2, n)

    print 'First Alg: %r Second Alg: %r.' % (first_alg, second_alg)
    if first_alg < second_alg:
      print 'Smallest value of n is %r.' % (n)
      break

if __name__ == "__main__":
  main()
